plat: marvell: rename common include file
authorKonstantin Porotchkin <[email protected]>
Sun, 29 Jul 2018 10:30:51 +0000 (13:30 +0300)
committerKonstantin Porotchkin <[email protected]>
Sun, 2 Sep 2018 11:10:47 +0000 (14:10 +0300)
Rename a8k_common.h to armada_common.h to keep the same header
name across all other Marvell Armada platforms.
This is especially useful since various Marvell platforms may
use common platform files and share the driver modules.

Change-Id: I7262105201123d54ccddef9aad4097518f1e38ef
Signed-off-by: Konstantin Porotchkin <[email protected]>
16 files changed:
drivers/marvell/amb_adec.c
drivers/marvell/ccu.c
drivers/marvell/gwin.c
drivers/marvell/i2c/a8k_i2c.c
drivers/marvell/io_win.c
drivers/marvell/iob.c
include/plat/marvell/a8k/common/a8k_common.h [deleted file]
include/plat/marvell/a8k/common/armada_common.h [new file with mode: 0644]
plat/marvell/a8k/a70x0/board/marvell_plat_config.c
plat/marvell/a8k/a70x0_amc/board/marvell_plat_config.c
plat/marvell/a8k/a80x0/board/marvell_plat_config.c
plat/marvell/a8k/a80x0_mcbin/board/marvell_plat_config.c
plat/marvell/a8k/common/mss/mss_bl2_setup.c
plat/marvell/a8k/common/plat_bl31_setup.c
plat/marvell/a8k/common/plat_ble_setup.c
plat/marvell/a8k/common/plat_pm.c

index 3fb2f3890249ca935a3ae55801e9460db44aec28..16fe772dac788e0d545116c93f223d7cabbc34dd 100644 (file)
@@ -7,7 +7,7 @@
 
 /* AXI to M-Bridge decoding unit driver for Marvell Armada 8K and 8K+ SoCs */
 
-#include <a8k_common.h>
+#include <armada_common.h>
 #include <debug.h>
 #include <mmio.h>
 #include <mvebu.h>
index 1502c3f8b33e4c154011eea38badc9693d7b38cf..acb1c00c0bf053e0f8216c8bff731f8546273181 100644 (file)
@@ -7,7 +7,7 @@
 
 /* CCU unit device driver for Marvell AP807, AP807 and AP810 SoCs */
 
-#include <a8k_common.h>
+#include <armada_common.h>
 #include <ccu.h>
 #include <debug.h>
 #include <mmio.h>
index b5705f7a4d166f1aac4e2d82d6eb816e1a72ab4d..a4743eb5e22b3fcbf9882240afb624649e63ccbb 100644 (file)
@@ -7,7 +7,7 @@
 
 /* GWIN unit device driver for Marvell AP810 SoC */
 
-#include <a8k_common.h>
+#include <armada_common.h>
 #include <debug.h>
 #include <gwin.h>
 #include <mmio.h>
index 737dd0a72f78a28a274cf27c27f8ba8895bc99f0..72a773162cb8f87f18d236e700364027e44346a3 100644 (file)
@@ -442,7 +442,7 @@ static int marvell_i2c_unstuck(int ret)
 void i2c_init(void *i2c_base)
 {
        /* For I2C speed and slave address, now we do not set them since
-        * we just provide the working speed and slave address in plat_def.h
+        * we just provide the working speed and slave address in mvebu_def.h
         * for i2c_init
         */
        base = (struct marvell_i2c_regs *)i2c_base;
index 40b198212d0372d1338027d9dce199b12767d108..c0424e08617351b40fca3d6592ba0fd2d8dfbc29 100644 (file)
@@ -7,7 +7,7 @@
 
 /* IO Window unit device driver for Marvell AP807, AP807 and AP810 SoCs */
 
-#include <a8k_common.h>
+#include <armada_common.h>
 #include <debug.h>
 #include <io_win.h>
 #include <mmio.h>
index acc4941f5d59ad0a7fa77616dff5273ecf3dd354..e88bc16730a256a9e822e341da2bb7c624c58b4c 100644 (file)
@@ -7,7 +7,7 @@
 
 /* IOW unit device driver for Marvell CP110 and CP115 SoCs */
 
-#include <a8k_common.h>
+#include <armada_common.h>
 #include <arch_helpers.h>
 #include <debug.h>
 #include <iob.h>
diff --git a/include/plat/marvell/a8k/common/a8k_common.h b/include/plat/marvell/a8k/common/a8k_common.h
deleted file mode 100644 (file)
index e727467..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2018 Marvell International Ltd.
- *
- * SPDX-License-Identifier:     BSD-3-Clause
- * https://spdx.org/licenses
- */
-
-#ifndef __A8K_COMMON_H__
-#define __A8K_COMMON_H__
-
-#include <amb_adec.h>
-#include <io_win.h>
-#include <iob.h>
-#include <ccu.h>
-
-/*
- * This struct supports skip image request
- * detection_method: the method used to detect the request "signal".
- * info:
- *     GPIO:
- *             detection_method: HIGH (pressed button), LOW (unpressed button),
- *             num (button mpp number).
- *     i2c:
- *             i2c_addr: the address of the i2c chosen.
- *             i2d_reg: the i2c register chosen.
- *     test:
- *             choose the DIE you picked the button in (AP or CP).
- *             in case of CP(cp_index = 0 if CP0, cp_index = 1 if CP1)
- */
-struct skip_image {
-       enum {
-               GPIO,
-               I2C,
-               USER_DEFINED
-       } detection_method;
-
-       struct {
-               struct {
-                       int num;
-                       enum {
-                               HIGH,
-                               LOW
-                       } button_state;
-
-               } gpio;
-
-               struct {
-                       int i2c_addr;
-                       int i2c_reg;
-               } i2c;
-
-               struct {
-                       enum {
-                               CP,
-                               AP
-                       } cp_ap;
-                       int cp_index;
-               } test;
-       } info;
-};
-
-/*
- * This struct supports SoC power off method
- * type: the method used to power off the SoC
- * cfg:
- *     PMIC_GPIO:
- *     pin_count: current GPIO pin number used for toggling the signal for
- *                notifying external PMIC
- *     info:      holds the GPIOs information, CP GPIO should be used and
- *                all GPIOs should be within same GPIO config. register
- *     step_count: current step number to toggle the GPIO for PMIC
- *     seq:       GPIO toggling values in sequence, each bit represents a GPIO.
- *                For example, bit0 represents first GPIO used for toggling
- *                the GPIO the last step is used to trigger the power off
- *                signal
- *     delay_ms:  transition interval for the GPIO setting to take effect
- *                in unit of ms
- */
-/* Max GPIO number used to notify PMIC to power off the SoC */
-#define PMIC_GPIO_MAX_NUMBER           8
-/* Max GPIO toggling steps in sequence to power off the SoC */
-#define PMIC_GPIO_MAX_TOGGLE_STEP      8
-
-enum gpio_output_state {
-       GPIO_LOW = 0,
-       GPIO_HIGH
-};
-
-typedef struct gpio_info {
-       int cp_index;
-       int gpio_index;
-} gpio_info_t;
-
-struct power_off_method {
-       enum {
-               PMIC_GPIO,
-       } type;
-
-       struct {
-               struct {
-                       int pin_count;
-                       struct gpio_info info[PMIC_GPIO_MAX_NUMBER];
-                       int step_count;
-                       uint32_t seq[PMIC_GPIO_MAX_TOGGLE_STEP];
-                       int delay_ms;
-               } gpio;
-       } cfg;
-};
-
-int marvell_gpio_config(void);
-uint32_t marvell_get_io_win_gcr_target(int ap_idx);
-uint32_t marvell_get_ccu_gcr_target(int ap_idx);
-
-
-/*
- * The functions below are defined as Weak and may be overridden
- * in specific Marvell standard platform
- */
-int marvell_get_amb_memory_map(struct addr_map_win **win,
-                              uint32_t *size, uintptr_t base);
-int marvell_get_io_win_memory_map(int ap_idx, struct addr_map_win **win,
-                                 uint32_t *size);
-int marvell_get_iob_memory_map(struct addr_map_win **win,
-                              uint32_t *size, uintptr_t base);
-int marvell_get_ccu_memory_map(int ap_idx, struct addr_map_win **win,
-                              uint32_t *size);
-
-#endif /* __A8K_COMMON_H__ */
diff --git a/include/plat/marvell/a8k/common/armada_common.h b/include/plat/marvell/a8k/common/armada_common.h
new file mode 100644 (file)
index 0000000..e727467
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2018 Marvell International Ltd.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ * https://spdx.org/licenses
+ */
+
+#ifndef __A8K_COMMON_H__
+#define __A8K_COMMON_H__
+
+#include <amb_adec.h>
+#include <io_win.h>
+#include <iob.h>
+#include <ccu.h>
+
+/*
+ * This struct supports skip image request
+ * detection_method: the method used to detect the request "signal".
+ * info:
+ *     GPIO:
+ *             detection_method: HIGH (pressed button), LOW (unpressed button),
+ *             num (button mpp number).
+ *     i2c:
+ *             i2c_addr: the address of the i2c chosen.
+ *             i2d_reg: the i2c register chosen.
+ *     test:
+ *             choose the DIE you picked the button in (AP or CP).
+ *             in case of CP(cp_index = 0 if CP0, cp_index = 1 if CP1)
+ */
+struct skip_image {
+       enum {
+               GPIO,
+               I2C,
+               USER_DEFINED
+       } detection_method;
+
+       struct {
+               struct {
+                       int num;
+                       enum {
+                               HIGH,
+                               LOW
+                       } button_state;
+
+               } gpio;
+
+               struct {
+                       int i2c_addr;
+                       int i2c_reg;
+               } i2c;
+
+               struct {
+                       enum {
+                               CP,
+                               AP
+                       } cp_ap;
+                       int cp_index;
+               } test;
+       } info;
+};
+
+/*
+ * This struct supports SoC power off method
+ * type: the method used to power off the SoC
+ * cfg:
+ *     PMIC_GPIO:
+ *     pin_count: current GPIO pin number used for toggling the signal for
+ *                notifying external PMIC
+ *     info:      holds the GPIOs information, CP GPIO should be used and
+ *                all GPIOs should be within same GPIO config. register
+ *     step_count: current step number to toggle the GPIO for PMIC
+ *     seq:       GPIO toggling values in sequence, each bit represents a GPIO.
+ *                For example, bit0 represents first GPIO used for toggling
+ *                the GPIO the last step is used to trigger the power off
+ *                signal
+ *     delay_ms:  transition interval for the GPIO setting to take effect
+ *                in unit of ms
+ */
+/* Max GPIO number used to notify PMIC to power off the SoC */
+#define PMIC_GPIO_MAX_NUMBER           8
+/* Max GPIO toggling steps in sequence to power off the SoC */
+#define PMIC_GPIO_MAX_TOGGLE_STEP      8
+
+enum gpio_output_state {
+       GPIO_LOW = 0,
+       GPIO_HIGH
+};
+
+typedef struct gpio_info {
+       int cp_index;
+       int gpio_index;
+} gpio_info_t;
+
+struct power_off_method {
+       enum {
+               PMIC_GPIO,
+       } type;
+
+       struct {
+               struct {
+                       int pin_count;
+                       struct gpio_info info[PMIC_GPIO_MAX_NUMBER];
+                       int step_count;
+                       uint32_t seq[PMIC_GPIO_MAX_TOGGLE_STEP];
+                       int delay_ms;
+               } gpio;
+       } cfg;
+};
+
+int marvell_gpio_config(void);
+uint32_t marvell_get_io_win_gcr_target(int ap_idx);
+uint32_t marvell_get_ccu_gcr_target(int ap_idx);
+
+
+/*
+ * The functions below are defined as Weak and may be overridden
+ * in specific Marvell standard platform
+ */
+int marvell_get_amb_memory_map(struct addr_map_win **win,
+                              uint32_t *size, uintptr_t base);
+int marvell_get_io_win_memory_map(int ap_idx, struct addr_map_win **win,
+                                 uint32_t *size);
+int marvell_get_iob_memory_map(struct addr_map_win **win,
+                              uint32_t *size, uintptr_t base);
+int marvell_get_ccu_memory_map(int ap_idx, struct addr_map_win **win,
+                              uint32_t *size);
+
+#endif /* __A8K_COMMON_H__ */
index 91719867035b7109da0327784b3bd718ffffe50b..26b67eb6d48470c96f41a2d6208c24ad1a3d3034 100644 (file)
@@ -5,7 +5,7 @@
  * https://spdx.org/licenses
  */
 
-#include <a8k_common.h>
+#include <armada_common.h>
 
 /*
  * If bootrom is currently at BLE there's no need to include the memory
index ec4124c1339d8e3a5a3b66495a498956fb39e862..f8a1c40be7de999ca51c8b933a911c7e7bbb2ee7 100644 (file)
@@ -5,7 +5,7 @@
  * https://spdx.org/licenses
  */
 
-#include <a8k_common.h>
+#include <armada_common.h>
 
 /*
  * If bootrom is currently at BLE there's no need to include the memory
index 43beffabfa0463156bc6ff08dbe2efdad814daa7..4948c9a33ec9ccd9ed793b5348276ca06f4a5354 100644 (file)
@@ -5,7 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#include <a8k_common.h>
+#include <armada_common.h>
+
 /*
  * If bootrom is currently at BLE there's no need to include the memory
  * maps structure at this point
index 079bd8fef5ba44dfb89edd175e59609a41022a08..384d0f54b946f601b2f4bf5658a98bf1d7ac8ab6 100644 (file)
@@ -5,9 +5,10 @@
  * https://spdx.org/licenses
  */
 
-#include <a8k_common.h>
+#include <armada_common.h>
 #include <delay_timer.h>
 #include <mmio.h>
+
 /*
  * If bootrom is currently at BLE there's no need to include the memory
  * maps structure at this point
index 21541855ba036ff1799a2f3c48060a4a5020fb03..973c56dc83919b145f54136731cf12ef4bb43c69 100644 (file)
@@ -5,7 +5,7 @@
  * https://spdx.org/licenses
  */
 
-#include <a8k_common.h>
+#include <armada_common.h>
 #include <bl_common.h>
 #include <ccu.h>
 #include <cp110_setup.h>
index 6c85fcc374933e7c967dfe9ea603285e37447786..e6ffeeab1708526e7ccd1cabc3dbbc39cb8ecba0 100644 (file)
@@ -5,7 +5,7 @@
  * https://spdx.org/licenses
  */
 
-#include <a8k_common.h>
+#include <armada_common.h>
 #include <ap_setup.h>
 #include <cp110_setup.h>
 #include <debug.h>
index 0cd62cbdb2ec4f2fe69dfbf5b7c43b51e9f89e02..d2607dafc99dc8b9c8e308f72d66578662b9311b 100644 (file)
@@ -5,8 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#include <a8k_common.h>
 #include <ap_setup.h>
+#include <armada_common.h>
 #include <aro.h>
 #include <ccu.h>
 #include <cp110_setup.h>
index c716ee0f7b3ea802da8759e56b8bf86ef0c39e54..ec4b55b3999dc8e5b6d1bb8b6d5024af68d2356d 100644 (file)
@@ -5,7 +5,7 @@
  * https://spdx.org/licenses
  */
 
-#include <a8k_common.h>
+#include <armada_common.h>
 #include <assert.h>
 #include <bakery_lock.h>
 #include <debug.h>